package org.thinker.util;

public class SimpleNode implements SqlNode{

	private SqlNode nextNode = null;
	private String key = null;
	private String oper = null;
	private String value = null;
	
	public SimpleNode(SqlNode nextNode, String key, String oper, String value){
		this.nextNode = nextNode;
		this.key = key;
		this.oper = oper;
		this.value = value;
	}
	
	public String getSql() {
		String sql = " " + key + " " + oper + " " + value;
		if(nextNode != null){
			return nextNode.getSql() + sql;
		}
		return sql;
	}
	

}
